INITLoader
By Ian Hendry

What INITLoader does
INITLoader has two main functions:
1)  INITLoader makes aliases to extensions (also called Òstartup documentsÓ or ÒINIT	sÓ), cdevs
and rdevs work as expected.  System 7.0 does not (at this time) support running aliases to
these items (the ÒMagic System FolderÓ does not even route them to the correct folders).
2)  INITLoader lets you choose additional folders from which to load extensions.
Why INITLoader does
Aliases to extensions and folders give you all the advantages of aliases.  One of the coolest
things is auto-mounting.  This means you can specify a folder on a floppy and the system will
ask you to mount the floppy when it resolves the alias.  The same is true of network volumes.
If you have (your extensions folder) an alias to an extension on an AppleShare¨ or
FileShareª volume, then at startup time you will get a password dialog (unless you created
the alias as a guest) and that server will be automatically mounted and the extension will run.
INITLoader can also automatically unmount any volumes that it mounts.  This cleans up so
you do not have a whole lot of extra volumes around when you get to the Finder	.
For those of you saying Òneat hack, so what?Ó  Here are examples.  Suppose you are a network
administrator and you always want your team to have the latest version of some extension.  It
is a headache for you to always have to find all the people and convince them to upgrade
(particularly if they all have to do it at once).  W	ith INITLoader there are two solutions:  you
can distribute an alias to the extension on a server or you can distribute a copy of INITLoader
with an alias to a folder on your server in it.  The second solution allows you to add whatever
extensions you want onto you team.
For another example, suppose you are developing an extension and you want to test it on
various machines.  INITLoader allows you to load your extension from the network with out
having to install on all those machines.
Notes

INITLoader will not load multiple copies of extensions.  INITLoader will not load any
extension from a file with the same type/creator as one it has already seen.  If you have
several copies of ÒProgrammer	Õs keyÓ for example, only the first one will load.
INITLoader first examines the normal places in the System Folder from which extensions are
loaded.  After all aliases to extensions have been resolved and run, then INITLoader looks
though folders that you selected.  This means that extensions found in the System Folder take
precedence (because INITLoader will load the each extension only once) over those in folders
you select.
INITLoader can run other copies of itself.  If one INITLoader loads a second INITLoader then
the second INITLoader will run and will load any extensions not loaded by the first one (	ie
those in folders specified to be loaded in the second INITLoader). When the second copy is
done, the first INITLoader will regain control and continue loading other extensions.  This
only works if the second INITLoader is loaded by the INITLoader (that is, NOT by the normal
extension loading done by the System).
If you have an alias to an extension, you cannot stop it from loading by moving the extension
itself (the alias will find it anyway).
T	esting
Use INITLoader at you own risk.  I have run INITLoader on everything from a Macintoshª
Plus to a Macintosh IIfx with 20 Meg real RAM.  It works with VM (I tried it a little) and in 32-
Bit mode.  I did not run it on a huge variety of extensions.  Most extensions tended to fall into
two categories:  worked fine and didnÕt work with 7.0 at all.
Cautions and Things that go bump in the hard disk
There are some extensions that do not like being moved around.  I hope with System 7.0
developers begin to remove location dependence from their code.  I figure the Soviets have
abandoned socialism, Germany has reunited, why not go for broke and hope for good code
from extensions?
INITLoader depends heavily on System 7.0 features and will not work under System 6.0.x.
Some extensions have support files.  These extensions should support alias files via
ÒResolveAliasFileÓ for their data files.  Until they do, you will have to have copies of their
data files on the various machines.  I wrote an extension to support alias files transparently
and there were some problems with doing that solution so now we have ResolveFinderAlias.
ResolveFinderAliasÕ predecessor appeared on the first System 7.0 Developer's CD and was
later added to the System as a new toolbox call.  Read about it in the Finder Interface chapter of
Inside Macintosh V	olume VI, use it in all your code that does not use Standard File.
Make sure AppleShare loads before INITLoader (which normally happens due to their
names).  Otherwise aliases to items on network volumes may not load correctly	.
Some extensions try to re-open themselves later	.  Several extensions actually try to open
themselves by name in the System Folder	.  Looking for yourself if kind of dangerous and just
looking in the System Folder doesnÕt work with System 7.0 at all (much less INITLoader).  If
you really need to find your file again, create an alias to it under 7.0 and keep that around.